/*
 *  sprite.h
 *  
 *  Created by James Dykstra
 *	Team 5
 *
 *  Copyright 2010 Michigan Technological University. All rights reserved.
 */
 
#ifndef SPRITE_H
#define SPRITE_H
#include "renderer.h"
#include "logic.h"

#include <math.h>

#ifndef M_PI
#define M_PI 3.14159265
#endif

class Sprite
{
public:
	SDL_Rect*		getRect(){ return &position; };
//	SDL_Rect*		getCurClip(){ return curClip; };
	SDL_Surface*	getSurface(){ return image; };

	virtual void 	show(int, int)=0;
	
protected:
	Renderer		*rnd;
	Logic			*logic;
	SDL_Surface		*image;
	SDL_Rect		position;
	//SDL_Rect		*curClip;
	GLuint			texId;
	GLfloat			angle;
	
	inline static double degreesToRadians(int d) {
		return d * 2 * M_PI / 360;
	}
	inline static float radiansToDegrees(double r) {
		return (float) (r*360 / (2 * M_PI));
	}

};

#endif
